/*
 * ----------------------------------------------------------------------------
 *  (C) Copyright European Telecommunications Standards Institute, 2001.
 *  All Rights Reserved.
 *
 *  All copies of this program, whether in whole or in part, and whether
 *  modified or not, must display this and all other embedded copyright
 *  and ownership notices in full.
 *
 * ----------------------------------------------------------------------------
 */
package org.etsi.ttcn.tri;

import java.io.Serializable;

/** A value of type TriMessageType is encoded test data which either
   is to be send to the SUT or has been received from the SUT.
 */
public interface TriMessage extends Serializable {

    /**
     * <code>getEncodedMessage</code> returns the message encoded according the coding rules
     * defined in the TTCN-3 specification.
     *
     * @return a <code>byte[]</code> or null if an error has occured while encoding.
     */
    public byte[]  getEncodedMessage();

    /** Sets the encoded message representation of this TriMessage to
	message.
    */
    public void    setEncodedMessage(byte[] message);

    /** Compares message with this TriMessage for equality. Returns
	true if and only if have the same encoded representation, false
	otherwise.
    */
    public boolean equals(TriMessage message);
}
